package mmc.action;

import mmc.Client;
import mmc.ui.Window;

public class OpenWindow extends InterfaceAction {
	private Window com;

	public OpenWindow(String name, String textureName, int key) {
		super(name, textureName, key);
	}
	
	public OpenWindow(String name, String textureName, int key, Window com){
		this(name, textureName, key);		
		this.com = com;
	}
	
	public void setCom(Window com) {
		this.com = com;
	}

	@Override
	public void performOnClient() {
		Client.client.ui.openWindow(com);
	}
	
	@Override
	public String toString(){		
		return this.getClass().getName() + " " + this.name;
	}
	
}
